<!doctype html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
    
  
  <link href="//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.min.css" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






  

<link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="linux,virtualBox," />








  <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico?v=5.1.0" />






<meta name="description" content="目标 10.45.4.30主机，系统为CentOS 6.5，因为IETest无法真实模拟IE6，7，8，9，10，11的环境，需要搭建几台真实环境的虚拟机，进行测试
如何用Xmanger远程连接10.45.4.30CentOS 6.5默认是连接不上10.45.4.30图形化界面的，需要在CentOS 6.5 开启Xmanager远程桌面登录
具体操作见：http://www.linuxidc.co">
<meta property="og:type" content="article">
<meta property="og:title" content="记在CentOS 6.5 下安装VirtualBox搭建XP虚拟机过程">
<meta property="og:url" content="http://wangxh89.github.io/CentOS-VirtualBox-install/index.html">
<meta property="og:site_name" content="wang.xiaohu's Blog">
<meta property="og:description" content="目标 10.45.4.30主机，系统为CentOS 6.5，因为IETest无法真实模拟IE6，7，8，9，10，11的环境，需要搭建几台真实环境的虚拟机，进行测试
如何用Xmanger远程连接10.45.4.30CentOS 6.5默认是连接不上10.45.4.30图形化界面的，需要在CentOS 6.5 开启Xmanager远程桌面登录
具体操作见：http://www.linuxidc.co">
<meta property="og:updated_time" content="2017-03-31T07:32:04.310Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="记在CentOS 6.5 下安装VirtualBox搭建XP虚拟机过程">
<meta name="twitter:description" content="目标 10.45.4.30主机，系统为CentOS 6.5，因为IETest无法真实模拟IE6，7，8，9，10，11的环境，需要搭建几台真实环境的虚拟机，进行测试
如何用Xmanger远程连接10.45.4.30CentOS 6.5默认是连接不上10.45.4.30图形化界面的，需要在CentOS 6.5 开启Xmanager远程桌面登录
具体操作见：http://www.linuxidc.co">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://wangxh89.github.io/CentOS-VirtualBox-install/"/>





  <title> 记在CentOS 6.5 下安装VirtualBox搭建XP虚拟机过程 | wang.xiaohu's Blog </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  














  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">wang.xiaohu's Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <h1 class="site-subtitle" itemprop="description">生活、技术个人博客</h1>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="http://wangxh89.github.io/CentOS-VirtualBox-install/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="wang.xiaohu">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/wxh.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="wang.xiaohu's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">
            
            
              
                记在CentOS 6.5 下安装VirtualBox搭建XP虚拟机过程
              
            
          </h2>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2014-12-31T15:22:36+08:00">
                2014-12-31
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/linux/" itemprop="url" rel="index">
                    <span itemprop="name">linux</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          
             <span id="/CentOS-VirtualBox-install/" class="leancloud_visitors" data-flag-title="记在CentOS 6.5 下安装VirtualBox搭建XP虚拟机过程">
               <span class="post-meta-divider">|</span>
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               
                 <span class="post-meta-item-text">阅读次数 </span>
               
                 <span class="leancloud-visitors-count"></span>
             </span>
          

          

          
            <div class="post-wordcount">
              
                <span class="post-meta-item-icon">
                  <i class="fa fa-edit"></i>
                </span>
                  
                    <span class="post-meta-item-text">字数统计</span>
                  
                    <span title="字数统计" }}">
                      726 字
                    </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                  
                    <span class="post-meta-item-text">阅读时长</span>
                  
                    <span title="阅读时长" }}">
                      3 分钟
                    </span>
              
            </div>
          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h3 id="目标"><a href="#目标" class="headerlink" title="目标"></a>目标</h3><p> 10.45.4.30主机，系统为CentOS 6.5，因为IETest无法真实模拟IE6，7，8，9，10，11的环境，需要搭建几台真实环境的虚拟机，进行测试</p>
<h3 id="如何用Xmanger远程连接10-45-4-30"><a href="#如何用Xmanger远程连接10-45-4-30" class="headerlink" title="如何用Xmanger远程连接10.45.4.30"></a>如何用Xmanger远程连接10.45.4.30</h3><p>CentOS 6.5默认是连接不上10.45.4.30图形化界面的，需要在CentOS 6.5 开启Xmanager远程桌面登录</p>
<p>具体操作见：<a href="http://www.linuxidc.com/Linux/2014-03/98548.htm" target="_blank" rel="external">http://www.linuxidc.com/Linux/2014-03/98548.htm</a></p>
<h3 id="安装VirtualBox"><a href="#安装VirtualBox" class="headerlink" title="安装VirtualBox"></a>安装VirtualBox</h3><p>下载VirtualBox-4.3.20-96996-Linux_amd64.run<br>我下载的地址是：<a href="http://download.pchome.net/system/sysenhance/down-87894-1.html" target="_blank" rel="external">http://download.pchome.net/system/sysenhance/down-87894-1.html</a><br>通过XBorwer连接10.45.4.30</p>
<p>在终端运行 ：<br>sh VirtualBox-4.3.20-96996-Linux_amd64.run</p>
<p><strong>报错： 缺少GCC ，安装GCC</strong></p>
<pre><code>yum -y install gcc
装完后输入 gcc --version进行验证
</code></pre><p><strong>报错： yum [Errno 256] No more mirrors to try 解决方法</strong></p>
<pre><code>yum clean all
yum makecache
</code></pre><p><strong>报错： Please install the build and header files for your current Linux kernel.</strong></p>
<pre><code> yum install kernel-devel
ln -s /usr/src/kernels/2.6.32-504.3.3.el6.x86_64/ /usr/src/linux
</code></pre><p>再次安装，终于成功</p>
<pre><code>[root@vm Downloads]# sh VirtualBox-4.3.20-96996-Linux_amd64.run
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation............
VirtualBox Version 4.3.20 r96996 (2014-11-21T14:12:48Z) installer
Please install the build and header files for your current Linux kernel.
The current kernel version is 2.6.32-431.el6.x86_64
Problems were found which would prevent VirtualBox from installing.
Please correct these problems and try again.
[root@vm Downloads]# sh VirtualBox-4.3.20-96996-Linux_amd64.run
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation............
VirtualBox Version 4.3.20 r96996 (2014-11-21T14:12:48Z) installer
Installing VirtualBox to /opt/VirtualBox
Python found: python, installing bindings...
Building the VirtualBox kernel modules

VirtualBox has been installed successfully.

You will find useful information about using VirtualBox in the user manual
  /opt/VirtualBox/UserManual.pdf
and in the user FAQ
  http://www.virtualbox.org/wiki/User_FAQ

We hope that you enjoy using VirtualBox.
</code></pre><h3 id="运行VirtualBox"><a href="#运行VirtualBox" class="headerlink" title="运行VirtualBox"></a>运行VirtualBox</h3><p><strong>报错： 根目录报空间不足</strong></p>
<pre><code>请参考上一篇文章处理 “CentOS 6.5 下根目录报空间不足 处理”
</code></pre><p><strong>报错：Error:<br>Failed to create the VirtualBox COM object.<br>The application will now terminate.<br>Start tag expected, ‘&lt;’ not found.<br>Location: ‘/home/xxxx/.VirtualBox/VirtualBox.xml’, line 1 (0), column 1.<br>/home/vbox/vbox-3.1.0/src/VBox/Main/VirtualBoxImpl.cpp[420] (nsresult VirtualBox::init()).<br>“xxxx”=你的用户名</strong></p>
<pre><code>删除/home/xxxx/.VirtualBox/VirtualBox.xml，然后就可以进入virtualbox，但是发现原来的虚拟机不见了。
别急，点击菜单中的Machine--&gt; Add 然后找到 xxx.vbox ，打开就可以了
</code></pre><h3 id="安装XP"><a href="#安装XP" class="headerlink" title="安装XP"></a>安装XP</h3><p><strong>问题：　ghostxp.iso上的很多工具在virtualbox下都不可用</strong></p>
<pre><code>第一次的尝试失败
+ partitionmagic不能用
+ 快速4分区不能用
+ 安装ghostxp到C盘不能用
+ WindowsXpPE是可用的　　但到里面安装系统还是不行
</code></pre><p>必须使用xp正常安装版</p>
<p>找了半天，只能通过迅雷下，公司下不了，晚上回家下，地址如下：<br>迅雷下载地址：thunder://QUFodHRwOi8vc29mdC51c2Fpa2EuY24vJUU2JTkzJThEJUU0JUJEJTlDJUU3JUIzJUJCJUU3JUJCJTlGL3dpbmRvd3MvV2luZG93c1hQL1ZMLUltYWdlL01TRE4vemgtaGFuc193aW5kb3dzX3hwX3Byb2Zlc3Npb25hbF93aXRoX3NlcnZpY2VfcGFja18zX3g4Nl9jZF92bF94MTQtNzQwNzAuaXNvWlo=Windows XP pro</p>
<p>with sp3 VOL 微软原版（简体中文）正版密钥：MRX3F-47B9T-2487J-KWKMF-RPWBY下面，开始体验虚拟机上安装操作系统</p>
<h3 id="注意"><a href="#注意" class="headerlink" title="注意"></a>注意</h3><p> virtualbox上面的 Host键 默认是 右Ctrol键</p>
<p>  virtualbox联网有问题，需要在 设置-&gt; 网络 -&gt; 高级 修改一下网    卡模拟 PCnet -&gt; Intel Pro</p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/linux/" rel="tag"># linux</a>
          
            <a href="/tags/virtualBox/" rel="tag"># virtualBox</a>
          
        </div>
      

      
        
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/CentOS-notEnough/" rel="next" title="记CentOS 6.5 下根目录报空间不足 处理">
                <i class="fa fa-chevron-left"></i> 记CentOS 6.5 下根目录报空间不足 处理
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/selenium-run-problem/" rel="prev" title="记Selenium WebDriver在IE chorme firefox浏览器运行">
                记Selenium WebDriver在IE chorme firefox浏览器运行 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>

          
          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/wxh.jpg"
               alt="wang.xiaohu" />
          <p class="site-author-name" itemprop="name">wang.xiaohu</p>
           
              <p class="site-description motion-element" itemprop="description"></p>
           
        </div>
        <nav class="site-state motion-element">
        
          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">8</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">6</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">12</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/wangxh89" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#目标"><span class="nav-number">1.</span> <span class="nav-text">目标</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#如何用Xmanger远程连接10-45-4-30"><span class="nav-number">2.</span> <span class="nav-text">如何用Xmanger远程连接10.45.4.30</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装VirtualBox"><span class="nav-number">3.</span> <span class="nav-text">安装VirtualBox</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#运行VirtualBox"><span class="nav-number">4.</span> <span class="nav-text">运行VirtualBox</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装XP"><span class="nav-number">5.</span> <span class="nav-text">安装XP</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#注意"><span class="nav-number">6.</span> <span class="nav-text">注意</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-tint"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">wang.xiaohu</span>
</div>



        

<div class="busuanzi-count">

  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv"><i class="fa fa-user"></i> 访问用户：<span class="busuanzi-value" id="busuanzi_value_site_uv"></span>人</span>
  

  
    <span class="site-pv"><i class="fa fa-eye"></i> 访问次数：<span class="busuanzi-value" id="busuanzi_value_site_pv"></span>次</span>
  
  
</div>



        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    
    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  <script type="text/javascript" src="//cdn.bootcss.com/jquery/2.1.3/jquery.min.js"></script>

  
  <script type="text/javascript" src="//cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js"></script>

  
  <script type="text/javascript" src="//cdn.bootcss.com/jquery_lazyload/1.9.7/jquery.lazyload.min.js"></script>

  
  <script type="text/javascript" src="//cdn.bootcss.com/velocity/1.2.1/velocity.min.js"></script>

  
  <script type="text/javascript" src="//cdn.bootcss.com/velocity/1.2.1/velocity.ui.min.js"></script>

  
  <script type="text/javascript" src="//cdn.bootcss.com/fancybox/2.1.5/jquery.fancybox.pack.js"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	





  





  





  



  
  

  

  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
  <script>AV.initialize("n5VCYRL0j4MHTB1MgIMq9bR5-gzGzoHsz", "6mpkU1dhSWoLYM7PEd05eiMA");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



  

  


  

</body>
</html>
